package com.sunwayworld.basemodule.business.batch.resource.impl;

import com.sunwayworld.basemodule.business.batch.bean.LimsBatchSampleProductBean;
import com.sunwayworld.framework.data.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.business.batch.resource.LimsBatchSampleProductResource;
import com.sunwayworld.basemodule.business.batch.service.LimsBatchSampleProductService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("送检单样本产品")
@RestController
@GikamBean
public class LimsBatchSampleProductResourceImpl implements LimsBatchSampleProductResource {

    @Autowired
    private LimsBatchSampleProductService limsBatchSampleProductService;

    @Override
    public LimsBatchSampleProductService getService() {
        return limsBatchSampleProductService;
    }

    @Log(value = "新增送检单样本产品", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public Page<LimsBatchSampleProductBean> selectBatchSampleProducts(RestJsonWrapperBean wrapperBean) {
        return getService().selectBatchSampleProducts(wrapperBean);
    }
}
